<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Apps\Apis\Common\DefCtl;

final class DefStorageCategoryCtl extends DefAbstract
{
    private const TABLE_NAME                = 'def_storage_category';
    private const FIELD_ID                  = 'dsac_id';
    private const FIELD_KEY                 = 'dsac_key';
    private const FIELD_PATH_PREFIX         = 'dsac_path_prefix';
    public const EXT_PATH_PREFIX            = 'pathPrefix';
    public const KEY_USER_AVATAR            = 'user_avatar';        // 用户头像
    public const KEY_USER_COVER             = 'user_cover';         // 用户主页图
    public const KEY_REPORT_MEDIA           = 'report_media';       // 举报媒体
    public const KEY_FEEDBACK_MEDIA         = 'feedback_media';     // 反馈媒体
    public const KEY_AD_IMAGE               = 'ad_image';           // 广告图片
    public const KEY_NEWS_IMAGE             = 'news_image';         // 新闻图片
    public const KEY_VIDEO_COVER            = 'video_cover';        // 影视资源封面
    public const KEY_VIDEO_RES              = 'video_res';          // 影视资源内容
    public const KEY_ADM_AVATAR             = 'adm_avatar';         // 管理员头像
    public const KEY_PAY_GOODS_ICON         = 'pay_goods_icon';     // 支付产品图标
    public const KEY_BANNER_APP             = 'banner_app';         // BannerApp
    public const KEY_BANNER_WEB             = 'banner_web';         // BannerWeb
    public const KEY_TASK_LOTTERY_ICON      = 'task_lottery_icon';  // 任务抽奖图标

    /**
     * @return static
     * tag
     */
    public static function tag():self
    {
        $fieldExtList       = [self::EXT_PATH_PREFIX => self::FIELD_PATH_PREFIX];
        return parent::tag()->config(self::TABLE_NAME, self::FIELD_ID, self::FIELD_KEY, $fieldExtList);
    }
}